﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SoundsPlayer : MonoBehaviour
{
    public bool WakePlay = false;
    public List<AudioSource> m_Audios= new List<AudioSource>();

    void Start()
    {
        if (WakePlay)
            Play();
    }

    void Update()
    {
        
    }

    public void Play()
    {
        int randomValue = Random.Range(0, m_Audios.Count);
        if(m_Audios[randomValue])
        {
            m_Audios[randomValue].Play();
        }
    }
}
